require 'rubygems'
require 'test/unit'
require "sandbox_base_test"

class DisablePrivilegesTest < TestSandbox
	
	def test_methods
		assert_raise NoMethodError, TypeError, RuntimeError do
			self.sandbox.run( "
			
							begin
							def @context_switcher.sandbox
								@sandbox
							end
							rescue
							end
							@context_switcher.sandbox.disable_privileges
							File.open('/tmp/#{rand(100000000)}','wb') do |f|
							end
							"
				)
		end
	end

end
